<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/menuAplicacion.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ListTbltiponominaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form id="form">

                <h:outputText escape="false" value="#{bundle.ListTbltiponominaEmpty}" rendered="#{tbltiponominaController.items.rowCount == 0}"/>
                <p:panel  id="panel" rendered="#{tbltiponominaController.items.rowCount > 0}" header="#{bundle.ListTbltiponominaTitle}"  style="panel">
                    <p:messages id="msgs"/> 

                    <p:dataTable value="#{tbltiponominaController.items}" var="item" paginator="true" rows="10" >
                        <p:column sortBy="#{item.codigo}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTbltiponominaTitle_codigo}"/>
                            </f:facet>
                            <h:outputText value="#{item.codigo}"/>
                        </p:column>
                        <p:column sortBy="#{item.nombre}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTbltiponominaTitle_nombre}"/>
                            </f:facet>
                            <h:outputText value="#{item.nombre}"/>
                        </p:column>
                        <p:column sortBy="#{item.periodo}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTbltiponominaTitle_periodo}"/>
                            </f:facet>
                            <h:outputText value="#{item.periodo}"/>
                        </p:column>
                        <p:column sortBy="#{item.codCom}">
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListTbltiponominaTitle_codCom}"/>
                            </f:facet>
                            <h:outputText value="#{item.codCom}"/>
                        </p:column>
                        <p:column>

                            <p:commandButton action="#{tbltiponominaController.prepareEdit}" value="#{bundle.ListTbltiponominaEditLink}"/>

                            <p:commandButton action="#{tbltiponominaController.destroy}" update=":form" value="#{bundle.ListTbltiponominaDestroyLink}"/>
                        </p:column>
                    </p:dataTable>
                    <p:commandButton action="#{tbltiponominaController.prepareCreate}" value="#{bundle.ListTbltiponominaCreateLink}"/>
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
